﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PortalParts/Portal.Master" AutoEventWireup="true" CodeBehind="Statistics.aspx.cs" Inherits="ZHDJ.Web.Portal.Questionnaire.Statistics" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache,must-revalidate" />
    <script type="text/javascript">
        $(function () {
            //$(".qtext").each(function (i, n) {
            //    if ($(n).html() == "1") {
            //        $(n).after("<input type='text' name='" + $(n).attr('tName') + "'/>");
            //    }
            //});
            
           

            $("#btnSubmit").click(function () {
                var rs = check();
                if (rs) {
                    $(this).attr("disabled", true);
                    $(this).removeClass("red").addClass("gray_disabled");
                    $("#ctl00_ContentPlaceHolder1_btnSubmitEx").click();
                }
                else {
                    alert("请完成已标红的题目！");
                }
            });

        });
        function check() {
            var rs = true;
            $(".onesubject").each(function (i, n) {
                if ($("input:checked", $(n)).length < 1) {
                    rs = false;
                    $(".onesubject_title", $(n)).css({ color: "red" });//标红
                } else {
                    $(".onesubject_title", $(n)).css({ color: "#000" });//标红
                }
            });
            return rs;
        }
        function dataError() {
            alert("提交失败，数据异常");
            location.href = location.href;
        }

        function loadError() {
            alert("加载问卷失败，数据异常");
            location.href = location.href;
        }
        function StautsError() {
            alert("问卷未发布");
            location.href = "../../default.aspx";
        }
        function nobegin() {
            alert("调查问卷未开始");
            location.href = "../../default.aspx";
        }
        function end() {
            alert("调查问卷已结束");
            location.href = "../../default.aspx";
        }
        function nojoinIn() {
            alert("你已经参与过此调查问卷");
            location.href = "../../default.aspx";
        }
        function chongfuError() {
            alert("此调查问卷已提交，请勿重复答题");
            location.href = "../../default.aspx";
        }
        function nop() {
            alert("你无权参与此调查问卷");
            location.href = "../../default.aspx";
        }
       
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <div class="party-navigation">
        当前位置：<a href="/Default.aspx">首页</a> > 问卷调查        
    </div>
	<div class="bgline"></div>
    <div class="article-title">
        <asp:Label ID="lblTitle" runat="server"></asp:Label>
    </div>
   
    <div class="article-content">
         
         
      
        <asp:Repeater runat="server" ID="rptSubject" OnItemDataBound="rptSubject_ItemDataBound">
            <ItemTemplate>
                <div class="onesubject">
                    <div class="onesubject_title">
                        <%# Container.ItemIndex+1 %>、<%#Eval("Title") %>
                        <asp:HiddenField runat="server" ID="hdSubjectID" Value='<%#Eval("ID") %>' />
                        <asp:HiddenField runat="server" ID="hdCategoryName" Value='<%#Eval("CategoryName") %>' />
                    </div>
                    <div>
                        <asp:Repeater runat="server" ID="rptOptions">
                            <ItemTemplate>
                                
                                <div class="onesubject_Options">
                                    <input id="<%#Eval("ID").ToString()+Container.ItemIndex %>" name="<%#Eval("ID")+"_"+Eval("CategoryName") %>" 
                                        type="<%#Eval("CategoryName") %>" value="<%#Eval("SID") %>" style="display:none"/><label id="lable<%#Eval("ID") %>" for="<%#Eval("ID") %>">
                                        <%#  _leter[Container.ItemIndex]+"、"+ Eval("Title") %>
                                    </label>
                                    <span class="qtext" style="display:none" tName="<%#Eval("ID").ToString()+"_"+Eval("SID").ToString()+"_name" %>" ><%# GetOpVisbile(Eval("IsTk")) %></span>
                                    
                                </div>
<div class="q_selt"><span>选择该项的有</span><span class="q_selte"><%#Convert.ToDouble(Eval("ChoicePercent")).ToString("p")%>（<%#Eval("ChoiceCount") %>人）</span></div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
         <asp:HiddenField runat="server" ID="hdQuestionnaireID" />
        <asp:HiddenField runat="server" ID="hdSubjectIDs" />
        <asp:HiddenField runat="server" ID="hdAnswer" Value="" />
        <asp:HiddenField runat="server" ID="hdSubmit" Value="" />
         <asp:HiddenField runat="server" ID="hdFormName" Value="" />
       <asp:HiddenField runat="server" ID="hdFormID" Value="" />
    </div>

</asp:Content>
